package com.six.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;   // 新增
import com.six.domain.entity.Dish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface DishMapper extends BaseMapper<Dish> {   // 新增继承

    /* ===== 商家端原有方法 ===== */
    int insert(@Param("dish") Dish dish);
    int updateById(@Param("dish") Dish dish);
    int deleteBatch(@Param("storeId") Integer storeId,
                    @Param("ids")   List<Long> ids);
    List<Dish> searchByNameLike(@Param("storeId") Integer storeId,
                                @Param("keyword") String keyword);
    List<Dish> selectById(@Param("ids") List<Long> ids);

    /* ===== 顾客端新增方法 ===== */
    List<Dish> selectCustomerVisible(@Param("storeId") Long storeId);
    List<Dish> selectCustomerVisibleByCategory(@Param("storeId") Long storeId,
                                               @Param("categoryId") Long categoryId);
}